from pathlib import Path
path = Path('programming.txt')
name = input('输入你的名字：')
path.write_text(name)